package com.bgs.eat.evaluate.service.impl;

import com.bgs.eat.evaluate.entity.EvaluateEntity;
import com.bgs.eat.evaluate.mapper.EvaluateMapper;
import com.bgs.eat.evaluate.service.EvaluateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @ClassName EvaluateServiceImpl
 * @Description TODO
 * @Author hbx
 * @Date 2022/10/31 14:53
 **/
@Service
public class EvaluateServiceImpl implements EvaluateService {

    @Autowired
    EvaluateMapper evaluateMapper;

    /**
    * @Author hbx
    * @Description 新增评论
    * @Date 2022/11/1 10:23
    * @param evaluateEntity
    */
    @Override
    public Integer submitForPublication(EvaluateEntity evaluateEntity) {
        evaluateEntity.setDelFlag(0);
        evaluateEntity.setCreateTime(new Date());
        return  evaluateMapper.insertSelective(evaluateEntity);
    }
}
